<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-08-16
 * Time: 18:02
 */

namespace App\Http\Controllers\Validator;
use Validator;

class SystemTypeVail
{

    public static function listType($params)
    {
        $validator = Validator::make($params, [
            'st_id'           => 'required'
        ]);
        if ($validator->fails()) {
            return  false;
        }
        return true;
    }
//添加分类
    public static function addType($params)
    {
        $validator = Validator::make($params, [
            'st_name'           => 'required',
            'st_superior_id'    => 'required'
        ]);
        if ($validator->fails()) {
            return  false;
        }
        return true;
    }

    //修改
    public static function editType($params)
    {
        $validator = Validator::make($params, [
            'st_id'           => 'required',
            'st_name'           => 'required'
        ]);
        if ($validator->fails()) {
            return  false;
        }
        return true;
    }

    //删除
    public static function delType($params)
    {
        $validator = Validator::make($params, [
            'st_id'           => 'required',
        ]);
        if ($validator->fails()) {
            return  false;
        }
        return true;
    }
}